<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

$valid_token = "a10548a1308743618ccfbfe01eb436ee";

require('../status.php');
$url = $status['url'];
$gw_address = $status['gw_address'];
$gw_port = $status['gw_port'];


$html  = "";
$html .= "<HTML>\n";
$html .= "   <HEAD>\n";
$html .= "      <TITLE>\n";
$html .= "         Captive Portal \n";
$html .= "      </TITLE>\n";
$html .= "   </HEAD>\n";
$html .= "<BODY>\n";
$html .= "   <H1>Congrats! You're logged in</H1>\n";
$html .= "   <br />\n";
if($url != "")
{
$html .= "   <a href=\"" . $url . "\">Start to surf!</a>\n";
$html .= "   <br />\n";
$html .= "   <br />\n";
}
$html .= "   <form name='login_form'  id='login_form' action='../login/index.php' method='post'>\n";
$html .= "      <input type='hidden' name='form_request' value='logout'>\n";
$html .= "      <input type='hidden' name='gw_address' value='" . $gw_address. "'>\n";
$html .= "      <input type='hidden' name='gw_port' value='" . $gw_port . "'>\n";
$html .= "      <input type='submit' value='Logout' /><br />\n";
$html .= "   </form>\n";
$html .= "</BODY>\n";
$html .= "</HTML>\n";


print "$html";

?>
